import FreeCADGui
from PyQt5.QtWidgets import QApplication

class MySecondCommand2:
    def GetResources(self):
        return {'Pixmap': 'a2p_Solver', 'MenuText': '创建块', 'ToolTip': '输入参数,创建块'}

    def Activated(self): #点击按钮执行的动作
        """Do something here"""
        toplevel = QApplication.topLevelWidgets()

        import Run_ui

    def IsActive(self):
        """Here you can define if the command must be active or not (greyed) if certain conditions
        are met or not. This function is optional."""
        return True
FreeCADGui.addCommand('MySecondCommand2', MySecondCommand2())
